QuickTime 3 Reference

| Previous | Chapter contents | Chapter top | Section top | Next |

Parameters

Name

Code

Type

Description

BlendMode

`bMod'

Enum

Contains the blend mode for the effect.

Pre-multiply color

`mclr'

RGBValue

If the BlendMode is "Pre-multiply Alpha", this parameter contains the color used in the pre-multiply blend, otherwise it is ignored.

Blend Mode Enum

The Blend Mode parameter can contain one of the following values:

  1. Straight Alpha - perform a standard alpha blend. The alpha channel value of the first source defines the amount of the first source that is included in the composited image, and one minus the alpha channel value of the first source defines the amount of the second source that is included in the composited image.
  2. Pre-multiply Alpha - calculates the destination pixel according to the following formulae:
    DestinationRed = PreMultiplyRed * (1-alphaC) + temp1 * alphaC
    DestinationGreen = PreMultiplyGreen * (1-alphaC) + temp2 * alphaC
    DestinationBlue = PreMultiplyBlue * (1-alphaC) + temp3 * alphaC

where:

    alphaC = alphaB + (1-alphaB) * alphaA
    temp1 = (alphaA * SourceARed + alphaB * sourceBRed)/alphaC
    temp2 = (alphaA * SourceAGreen + alphaB * sourceBGreen)/alphaC
    temp3 = (alphaA * SourceABlue + alphaB * sourceBBlue)/alphaC
  1. Reverse Alpha - perform a reverse alpha blend. The one minus the alpha channel value of the first source defines the amount of the first source that is included in the composited image, and the alpha channel value of the first source defines the amount of the second source that is included in the composited image.

© 1997 Apple Computer, Inc.

| Previous | Chapter contents | Chapter top | Section top | Next |